---@class ExpeditionBuffPanel : UIComponentBase
local ExpeditionBuffPanel = Class("",UIComponentBase)
local t = ExpeditionBuffPanel

function t:OnCreate()
    self.nameText = self:GetChild("Title")
    self.icon = self:GetChild("Bufficon")
    self.tipText = self:GetChild("BuffTips")
    self.ctrl= self:GetController("type")
end

function t:OnEnable()

end
function t:OnDisable()
end
function t:OnDestroy()
end

function t:RefreshBuff(buffId)
    self.ctrl.selectedIndex = 2
    ObjUtil.SetBuffIcon(buffId,self.icon,self.nameText,self.tipText)
end
--迷雾温泉
function t:RefreshHotSprings(stageId)
    local num = logicMgr.ExpeditionMgr.GetCurStageCfgParam(stageId,"f_Buff_1")
    if num == nil then
        logError("找不到表t_expedition  id:"..stageId)
        return
    end
    self.nameText.text = getLanguage("expedition_buff1_title")
    self.tipText.text = string.format(getLanguage("expedition_buff1_des"),num)
end
--神圣祭坛
function t:RefreshAltar(stageId)
    local num = logicMgr.ExpeditionMgr.GetCurStageCfgParam(stageId,"f_Buff_2")
    if num == nil then
        logError("找不到表t_expedition  id:"..stageId)
        return
    end
    self.nameText.text = getLanguage("expedition_buff2_title")
    self.tipText.text = string.format(getLanguage("expedition_buff2_des"),num)
end
return t